<template>
  <view class="dialog">
    <view>
      <view class="d_top">
        <text>评价详情</text>
        <image src="http://wangxinbao.oss-cn-beijing.aliyuncs.com/2024/04/03/c3c96cda2891467381f385fd63907190.png"
          @click="handleCancel" />
      </view>
      <view class="enteriseLine">
        <view class="enteriseRate">企业评价</view>
        <view v-if="textareaValue">
          <view class="d_text">工作评分</view>
          <view class="d_rate">
            <uni-rate :value="rateValue" @change="handleChangeRate" :size="45" :readonly="true" />
            <text>满意</text>
          </view>
          <view class="d_text2">评价内容</view>
          <view class="d_textarea">
            {{ textareaValue }}
          </view>
        </view>
        <view v-else>
          企业未评价~
        </view>
      </view>
      <view class="enteriseLine">
        <view class="enteriseRate">求职者评价</view>
        <view v-if="textareaValue1">
          <view class="d_text">工作评分</view>
          <view class="d_rate">
            <uni-rate :value="rateValue1" @change="handleChangeRate" :size="45" :readonly="true" />
            <text>满意</text>
          </view>
          <view class="d_text2">评价内容</view>
          <view class="d_textarea">
            {{ textareaValue1 }}
          </view>
        </view>
        <view v-else>求职者未评价~</view>
      </view>
    </view>
  </view>
</template>

<script>
import { getScoreInfo } from "@/api/pages/mine.js"

export default {
  props: {
    seekerLogId: {
      type: String
    }
  },
  components: {},
  data() {
    return {
      textareaValue: '', // 内容
      textareaValue1: '',
      showDialog: true, // 弹窗隐藏显示
      rateValue: '',  // 星星的数量
      rateValue1: ''
    };
  },
  computed: {},
  // 监控data中的数据变化
  watch: {
  },
  onLoad(options) {
  },
  onShow(options) {
  },
  onReady() { },
  mounted(option) {
    console.log(this.seekerLogId, 111);
    getScoreInfo(this.seekerLogId).then((res) => {
      if (res.code === 200) {
        this.rateValue = res.data.entScore
        this.rateValue1 = res.data.userScore
        this.textareaValue = res.data.entRemark
        this.textareaValue1 = res.data.userRemark
      }
    })
  },
  methods: {
    // 关闭弹窗
    handleCancel() {
      this.$emit('changeRateDialogShow', false)
    },
  },
};
</script>
<style lang="scss" scoped>
.dialog {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;

  >view {
    width: 670rpx;
    height: 956rpx;
    background: #Fff;
    border-radius: 32rpx;
    padding: 30rpx 24rpx;
    overflow: auto;

    >view {
      width: 100%;
      align-items: center;
    }

    .d_top {
      display: flex;
      justify-content: space-between;
      font-size: 36rpx;
      color: #000000e0;
      font-weight: 500;

      image {
        width: 48rpx;
        height: 48rpx;
      }
    }

    .enteriseLine {

      .enteriseRate {
        margin-top: 60rpx;
        margin-bottom: 20rpx;
        font-weight: 500;
        font-size: 36rpx;
        text-decoration: underline;
      }

      .d_text {
        font-size: 32rpx;
        color: #000000e0;
        margin-bottom: 24rpx;
        font-weight: 900;
      }

      .d_rate {
        margin-bottom: 40rpx;

        >text {
          font-weight: 900;
          font-size: 24rpx;
          color: #00000073;
          margin-left: 20rpx;
        }
      }

      .d_text2 {
        font-weight: 900;
        font-size: 32rpx;
        color: #000000e0;
        margin-bottom: 24rpx;
      }

      .d_textarea {
        font-size: 28rpx;
      }
    }
  }
}
</style>
